import java.util.LinkedList;
import java.util.List;

import org.ldaptive.LdapException;
import org.ldaptive.auth.AggregateDnResolver.AuthenticationHandler;
import org.ldaptive.auth.AuthenticationCriteria;
import org.ldaptive.auth.AuthenticationHandlerResponse;

public class SoaAuthenticationHandler extends AuthenticationHandler {

	private List<AuthenticationHandler> handlers = new LinkedList<AuthenticationHandler>();

	@Override
	public AuthenticationHandlerResponse authenticate(
			AuthenticationCriteria criteria) throws LdapException {
		// TODO Auto-generated method stub
		for (AuthenticationHandler authenticationHandler : handlers) {
			try {
				AuthenticationHandlerResponse response = authenticationHandler
						.authenticate(criteria);
				
			} catch (Exception e) {
				// TODO: handle exception
			}
		}
		return super.authenticate(criteria);
	}

}
